<?php
class LoginController extends CController{
    //ログインaction
    public function actionLogin(){
        $model=new LoginForm;
        if(isset($_POST['LoginForm'])){
            $model->attributes = $_POST['LoginForm'];
            if($model->validate()&&$model->login()){
               $this->redirect(array('common/manager'));
            }
        }
        $this->layout='_layout';
        $this->render('login',array('title'=>'Login Page','model'=>$model));
    }
}
